<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="/wcs/Public/admin/js/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$(function(){
		    $('#submit').click(function(){
		    	$.ajax( {    
		    	    url:"<?php echo U('admin/order/add');?>",// 跳转到 action    
		    	    data:{
		    	    	name:$('#name').val(),
		    	    	password:$('#password').val(),
		    	    	email:$('#email').val()     
		    	    },    
		    	    type:'post',    
		    	    dataType:'json',    
		    	    success:function(data) {    
		    	        if(data.s == 0 ){    
		    	        	$("#mess").append("<a style='color:blue;font-size:18px;'>"+data['c']+"<a>");    
		    	        }else{
		    	        	$("#mess").append("<a style='color:blue;font-size:18px;'>插入数据失败！<a>");
			    	        }    
		    	     },    
		    	     error : function() {    
		    	    	 $("#mess").append("<a style='color:red;font-size:18px;'>插入数据错误！<a>");   
		    	     }    
		    	});
		    });  
		});
	});
</script>
</head>
<body>
	<div style="color:red;" id="mess"></div>
	<form action="" method="post">
	  账号	：<input id="name" type="text" name="name" /><br />
	  密码：<input id="password" type="text" name="password" /><br />
	 邮箱：<input id="email" type="text" name="email" />
	      <input id="submit" type="button" value="提交" />
	</form>
</body>
</html>